<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>播放暂停</title>
</head>
<body>
   <video id="IVideo">
       <source src="movie.ogg">
   </video>
   <hr>
  <button id="switch">播放</button>

    <script>
        let IVideo = document.getElementById('IVideo');

        document.getElementById('switch').onclick =function () {

           if (IVideo.paused) {
               IVideo.play();
               document.getElementById('switch').textContent = "暂停";
           }
           else {
               IVideo.pause();
               document.getElementById('switch').textContent = "播放";
           }
        }
    </script>

</body>
</html>